function varargout = rmUnnecessaryFields(varargin)

nIn = length(varargin);
switch nIn
    case 1
        net = varargin{1}.net;
        solv = varargin{1}.solv;
    case 2
        [net, solv] = varargin{:};
end

net = mycaffe.rmFields(net, {'result_path', 'content'});
solv = mycaffe.rmFields(solv, {'net', 'snapshot_prefix', 'test_iter', 'test_interval', 'display'});

switch nIn
    case 1
        varargin{1}.net = net;
        varargin{1}.solv = solv;
        varargout = varargin;
    case 2
        varargout = {net, solv};
end
